fix(security): honor exclusions and stabilize fingerprints - #539
Merged
solomonneas merged 2 commits intoJul 26, 2026
Conversation
_path_matches_any treated ** patterns as literal prefixes, so exclude_paths never pruned .brigade evidence bundles or security.toml from scans. Co-Authored-By: Codex <codex@openai.com> Co-authored-by: Cursor <cursoragent@cursor.com>
|
Important Review skippedAuto reviews are limited based on label configuration. 🏷️ Required labels (at least one) (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository: escoffier-labs/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Keep suppressions stable across unrelated line shifts while preserving distinct identities for duplicate findings. Migrate exact legacy singleton suppressions through a validated local alias map and keep report, health, diff, and import behavior compatible. Co-Authored-By: Codex <codex@openai.com> Co-authored-by: Cursor <cursoragent@cursor.com>
solomonneas
force-pushed
the
t3code/security-scanner-exclusions-fingerprints
branch
from
July 26, 2026 17:20
735e593 to
dcdde06
Compare
solomonneas
marked this pull request as ready for review
July 26, 2026 17:21
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.brigade/**and other trailing/**exclusions prune their repo-relative subtree before files are opened#529 root cause
exclude_pathswas already parsed, resolved, applied by the scan engine, and projected into reports. The failure was in_path_matches_any: it treated.brigade/**as literal path text, so neither.brigadenor its descendants matched and the walk entered evidence bundles.The reported
nullconfig clue did not identify dropped plumbing.brigade security config --jsonnests resolved settings under.config, so the resolved value is.config.exclude_paths, not a top-level field.The matcher keeps path settings as literal repo-relative prefixes. Only a trailing
/**is accepted as an alias for the same prefix, including the named root. Bracketed paths such asapp/[id]remain literal.#530 identity and migration
The primary fingerprint no longer contains the absolute line. It hashes
rule_id, repo-relative path, a normalized redacted excerpt, and occurrence. Identical matches in one file include duplicate cardinality and occurrence, so suppressing one does not hide another. Adding or removing an identical duplicate rekeys that group and requires review instead of transferring a suppression.Each finding also carries the old line-based fingerprint. An exact legacy singleton suppression is migrated to the primary fingerprint and recorded in
.brigade/security/fingerprint-migration-map.json. Duplicate groups never inherit a singleton legacy alias. Old report bundles and direct legacy IDs remain manageable through the map.For the observed fingerprints,
68041634653069ecand3076e8de762703a9remain legacy line-based identities. If the first upgraded scan sees the finding at the original location,68041634653069ecmaps to one content fingerprint; after lines move, that primary stays unchanged and3076e8de762703a9is only the current legacy alias. If the first upgraded scan happens after the move, the old fingerprint cannot be matched safely and needs one review under the content identity.This stops new history entries caused only by unrelated line shifts. Existing reports, imported history, and historical totals are not rewritten.
Verification
Codex review found and drove regression coverage for duplicate cardinality, symlinked closeout state, historical report IDs and diffs, accepted-risk health, stale-report unsuppression, scan-time map use, and severity changes in work imports.
Closes #529
Closes #530